﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows.Threading;
using VoiceTestPlatform.Infrastrature;

namespace VoiceTestPlatform
{
    public class ResultManager
    {

        static ResultManager()
        {
            resultitems = new ObservableCollection<TestResult>();
            recordResults = new ObservableCollection<TestResult>();
            artificialResults = new ObservableCollection<TestResult>();
            Dispatcher = Dispatcher.CurrentDispatcher;
        }

        private static Dispatcher dispatcher;

        public static Dispatcher Dispatcher
        {
            get { return dispatcher; }
            private set { dispatcher = value; }
        }



        private static ObservableCollection<TestResult> resultitems;

        public static ObservableCollection<TestResult> ResultItems
        {
            get
            {
                return resultitems;
            }
        }
        private static TestResult penddingResult;
        public static TestResult PenddingResult
        {
            get { return penddingResult; }
            set { 
                penddingResult = value;
                Log.Write(value == null?"PenddingResult 被设为null":("PenddingResult 被设为"+penddingResult.AudioCommand));
            }
        }


        private static ObservableCollection<TestResult> recordResults;
        /// <summary>
        /// 误测试 结果 
        /// </summary>
        public static ObservableCollection<TestResult> RecordResults
        {
            get
            {
                return recordResults;
            }
        }

        private static ObservableCollection<TestResult> artificialResults;
        /// <summary>
        /// 人工测试 结果 
        /// </summary>
        public static ObservableCollection<TestResult> ArtificialResults
        {
            get
            {
                return artificialResults;
            }
        }

    }
}
